From 80afd15ee08885883624baa12d16ae79050da580 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 25 Mar 1993 03:51:20 +0000 Subject: [PATCH] Arrange for C compilation throughout the tree to get C_SWITCH_SYSTEM from the configuration files. * configure: Extract C_SWITCH_SYSTEM from the machine and system-dependent files, and save it in the top-level Makefile. * Makefile.in (C_SWITCH_SYSTEM): New flag for configure to edit. (lib-src/Makefile): Edit C_SWITCH_SYSTEM into lib-src/Makefile. --- Makefile.in | 2 ++ configure1.in | 17 +++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index 079e5849aeb..2c752761380 100644 --- a/Makefile.in +++ b/Makefile.in @@ -42,6 +42,7 @@ MAKE = make # BSD doesn't have it as a default. CC=cc CONFIG_CFLAGS=-g +C_SWITCH_SYSTEM= ### These help us choose version- and architecture-specific directories ### to install files in. @@ -253,6 +254,7 @@ lib-src/Makefile: ${srcdir}/lib-src/Makefile.in Makefile -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|' \ -e 's|^CC *=.*$$|CC='"${CC}"'|' \ -e 's|^CONFIG_CFLAGS *=.*$$|CONFIG_CFLAGS='"${CONFIG_CFLAGS}"'|' \ + -e 's|^C_SWITCH_SYSTEM *=.*$$|C_SWITCH_SYSTEM='"${C_SWITCH_SYSTEM}"'|' \ -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|' \ -e '/^# DIST: /d') > lib-src/Makefile.tmp ${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile diff --git a/configure1.in b/configure1.in index e6f7aa99fd8..6c5b3973023 100755 --- a/configure1.in +++ b/configure1.in @@ -944,7 +944,11 @@ echo ' #ifndef LIBS_SYSTEM #define LIBS_SYSTEM #endif +#ifndef C_SWITCH_SYSTEM +#define C_SWITCH_SYSTEM +#endf @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM +@configure@ c_switch_system=C_SWITCH_SYSTEM #ifdef SYSTEM_MALLOC @configure@ system_malloc=yes #else @@ -1027,13 +1031,14 @@ rm -f Makefile.tmp # If you are thinking about editing it, you should seriously consider # running \`${progname}' instead, or editing # \`${srcdir}/Makefile.in' itself." - /bin/sed < ${srcdir}/Makefile.in \ - -e 's|^configname *=.*$|configname='"${configuration}"'|' \ - -e 's|^version *=.*$|version='"${version}"'|' \ - -e 's|^srcdir *=.*$|srcdir='"${srcdir}"'|' \ - -e 's|^CC *=.*$|CC='"${default_cc}"'|' \ + /bin/sed < ${srcdir}/Makefile.in \ + -e 's|^configname *=.*$|configname='"${configuration}"'|' \ + -e 's|^version *=.*$|version='"${version}"'|' \ + -e 's|^srcdir *=.*$|srcdir='"${srcdir}"'|' \ + -e 's|^CC *=.*$|CC='"${default_cc}"'|' \ -e 's|^CONFIG_CFLAGS *=.*$|CONFIG_CFLAGS='"${default_cflags}"'|' \ - -e 's|^LOADLIBES *=.*$|LOADLIBES='"${libsrc_libs}"'|' \ + -e 's|^C_SWITCH_SYSTEM *=.*$|C_SWITCH_SYSTEM='"${c_switch_system}"'|' \ + -e 's|^LOADLIBES *=.*$|LOADLIBES='"${libsrc_libs}"'|' \ -e '/^# DIST: /d') > Makefile.tmp ${srcdir}/move-if-change Makefile.tmp Makefile -- 2.30.2